package com.mingqijia.gassafety.authority.api.req.privilege;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 更新数据请求
 * @author Damon S.
 * @version v0.2
 * @date 2021-06-19
 */
@Data
@ApiModel(value = "更新权限请求")
public class UpdatePrivilegeReqDTO implements Serializable {

    @NotNull(message = "权限ID不能为空")
    @ApiModelProperty(value = "权限ID")
    @Pattern(regexp = "^[\\w\\d]{1,32}$", message = "ID格式不合法")
    private String privId;

    @ApiModelProperty(value = "状态：1-激活，0-冻结")
    @Max(value = 1, message = "状态值不合法")
    private Integer state;

    @ApiModelProperty(value = "权限内容")
    private String data;

}
